/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.jfonia.constants;

import java.awt.Color;
import java.awt.event.KeyEvent;
import org.jfonia.model.elements.Clef.Type;

/**
 *
 * @author Rik Bauwens
 */
public class ViewConstants
{
        public final static Color MAIN_BACKGROUND_COLOR = Color.WHITE;
        public final static Color SCRIBBLE_PANEL_BACKGROUND_COLOR = Color.LIGHT_GRAY;
        public final static int TAPPING_DIALOG_WIDTH = 200;

        public final static int ERROR_CONSOLE_ROWS = 10;
        public final static int ERROR_CONSOLE_COLUMNS = 50;

        public final static int LABELS_BAR_HEIGHT = 10;
        public final static int LABEL_WIDTH = 5;
        public final static Color LABEL_COLOR = Color.DARK_GRAY;

        public final static int TEXTFIELD_HEIGHT = 20;
        public final static int FRAME_HEADER_THICKNESS = 10;
        public final static int STAFF_HEADER_THICKNESS = 10;

        public final static int ROUNDRECT_ARC_WIDTH = 5;
        public final static int ROUNDRECT_ARC_HEIGHT = 5;

        public final static double INITIAL_FRAME_WIDTH = 8.0;

        public final static int STAFF_LINE_COUNT = 5;
        public final static double STAFF_LINE_SPACING = 8.0;

        public final static Color BACKGROUND_COLOR = Color.WHITE;
        public final static Color GROUPINGBOX_COLOR = Color.DARK_GRAY;

        public final static Color ELEMENT_COLOR = Color.WHITE;
        public final static Color ELEMENT_SELECTED_COLOR = new Color(180, 180, 180);
        public final static Color ELEMENT_HIGHLIGHTED_COLOR = new Color(220, 220, 220);

        public final static double SELECTIONBOX_SPACING = 2.0;
        public final static Color SELECTIONBOX_EDGE_COLOR = Color.ORANGE;

        public final static Color SYMBOL_COLOR = Color.BLACK;
        public final static Color STAFF_COLOR = Color.BLACK;

        public final static double MOUSE_POINTER_REGION_WIDTH  = 1.0;
        public final static double MOUSE_POINTER_REGION_HEIGHT  = 1.0;

        public final static double CARET_SPACING = 1.0;
        public final static double CARET_THICKNESS = 1.0;
        public final static int CARET_BLINK_INTERVAL = 500; //milliseconds

        public final static int INSERT_A_KEYCODE = KeyEvent.VK_A;
        public final static int INSERT_B_KEYCODE = KeyEvent.VK_B;
        public final static int INSERT_C_KEYCODE = KeyEvent.VK_C;
        public final static int INSERT_D_KEYCODE = KeyEvent.VK_D;
        public final static int INSERT_E_KEYCODE = KeyEvent.VK_E;
        public final static int INSERT_F_KEYCODE = KeyEvent.VK_F;
        public final static int INSERT_G_KEYCODE = KeyEvent.VK_G;
        public final static int INSERT_REST_KEYCODE = KeyEvent.VK_R;
        public final static int INSERT_CLEF_KEYCODE = KeyEvent.VK_S; //(S: sleutel)
        public final static int INSERT_KEYSIGNATURE_KEYCODE = KeyEvent.VK_K;
        public final static int INSERT_TIMESIGNATURE_KEYCODE = KeyEvent.VK_T;
        public final static int INSERT_BAR_KEYCODE = KeyEvent.VK_L; //(L: line)
        public final static int REMOVE_LEFT_KEYCODE = KeyEvent.VK_BACK_SPACE;
        public final static int MOVE_LEFT_KEYCODE = KeyEvent.VK_LEFT;
        public final static int MOVE_RIGHT_KEYCODE = KeyEvent.VK_RIGHT;
        public final static int MOVE_UP_KEYCODE = KeyEvent.VK_UP;
        public final static int MOVE_DOWN_KEYCODE = KeyEvent.VK_DOWN;

        public final static int TEXT_ENTER_KEYCODE = KeyEvent.VK_ENTER;

        //Staffs
        public final static double STAFF_BOX_WIDTH = 20;
        public final static double STAFF_BOX_LEFT_MARGIN = 5;
        public final static double STAFF_BOX_RIGHT_MARGIN = 5;
        public final static double STAFF_RIGHT_MARGIN = STAFF_BOX_WIDTH
                                                      + STAFF_BOX_LEFT_MARGIN
                                                      + STAFF_BOX_RIGHT_MARGIN;
        public final static Color STAFF_BOX_COLOR = new Color(150, 150, 150);
        public final static Color STAFF_BOX_SELECTED_COLOR = new Color(253, 222, 157);

        //Frames
        public final static double FRAME_BOX_WIDTH = 20;
        public final static double FRAME_BOX_TOP_MARGIN = 5;
        public final static double FRAME_BOX_BOTTOM_MARGIN = 5;
        public final static double STAFF_COLLECTION_SPACING = FRAME_BOX_WIDTH
                                                            + FRAME_BOX_TOP_MARGIN
                                                            + FRAME_BOX_BOTTOM_MARGIN;
        public final static Color FRAME_BOX_COLOR = new Color(150, 150, 150);
        public final static Color FRAME_BOX_SELECTED_COLOR = new Color(253, 222, 157);

        //Scribbles
        public final static double SCRIBBLE_PANEL_MIN_WIDTH = 200;
        public final static double SCRIBBLE_PANEL_MIN_HEIGHT = 300;
        public final static float SCRIBBLE_FONT_SIZE = 18f;
        public final static int SCRIBBLE_TOP_MARGIN = 10;
        public final static int SCRIBBLE_LEFT_MARGIN = 10;
        public final static int SCRIBBLE_BOTTOM_MARGIN = 0;
        public final static int SCRIBBLE_RIGHT_MARGIN = 0;
        public final static float SCRIBBLE_DEFAULT_ALPHA = (float) 1.0;
        public final static float SCRIBBLE_SELECTED_ALPHA = (float) 0.5;

        //Dialogs
        public final static Color DIALOG_BACKGROUND_COLOR = Color.LIGHT_GRAY;
        public final static float DIALOG_HEADER_FONT_SIZE = 15f;
        public final static int DIALOG_ICON_TEXT_GAP = 25;
        public final static int DIALOG_HEADER_MARGIN = 25;
        public final static int DIALOG_TOP_MARGIN = 15;
        public final static int DIALOG_LEFT_MARGIN = 25;
        public final static int DIALOG_RIGHT_MARGIN = 25;
        public final static int DIALOG_BOTTOM_MARGIN = 25;

        //Play panel
        public final static Color PLAYPANEL_CARET_COLOR = Color.LIGHT_GRAY;
        public final static Color PLAYPANEL_OVERLAY_COLOR = Color.LIGHT_GRAY;
        public final static float PLAYPANEL_ALPHA = .3f;

        //Notation toolbar
        public final static float TITLE_LABEL_FONT_SIZE = 11f;
        public final static float OPTION_LABEL_FONT_SIZE = 10f;
        public final static int SWITCH_PANEL_BUTTON_SIZE = 18;

        public final static Color OPTION_BACKGROUND_COLOR = Color.LIGHT_GRAY;
        public final static Color OPTION_HIGHLIGHTED_COLOR = Color.WHITE;
        public final static Color OPTION_SELECTED_COLOR = Color.DARK_GRAY;

        public final static int SYMBOL_SIZE = 23;
        public final static int BAR_HEIGHT = 23;
        public final static int LEFT_SPACING = 7;
        public final static int LABEL_SPACING = 10;
        public final static int OPTION_BUTTON_SIZE = 20;
        public final static int OPTION_SPACING = 2;
        public final static int OPTIONS_SPACING = 20;
        public final static int DEFAULT_TEXTBOX_SIZE = 1;

        public final static int NOTEHEAD1 = 0;
        public final static int NOTEHEAD1_2 = 1;
        public final static int NOTEHEAD1_4 = 2;
        public final static int ACC_DOUBLE_SHARP = 2;
        public final static int ACC_SHARP = 1;
        public final static int ACC_NATURAL = 0;
        public final static int ACC_FLAT = -1;
        public final static int ACC_DOUBLE_FLAT = -2;
        public final static int NO_STEM = 0;
        public final static int STEM = 1;
        public final static int REST1 = 192;
        public final static int REST1_2 = 96;
        public final static int REST1_4 = 48;
        public final static int REST1_8 = 24;
        public final static int REST1_16 = 12;
        public final static int REST1_32 = 6;
        public final static int G_CLEF = 0;
        public final static int F_CLEF = 1;
        public final static int C_CLEF = 2;
        public final static int G_MINUS8_CLEF = 3;
        public final static int G_PLUS8_CLEF = 4;
        public final static int F_MINUS8_CLEF = 5;
        public final static int F_PLUS8_CLEF = 6;

        public final static int INITIAL_NOTEHEAD = NOTEHEAD1_4;
        public final static int INITIAL_ACCIDENTAL = ACC_NATURAL;
        public final static int INITIAL_STEM = STEM;
        public final static int INITIAL_FLAGS = 0;
        public final static int INITIAL_DOTS = 0;
        public final static int INITIAL_CLEF = G_CLEF;
        public final static int INITIAL_KEY_SIGNATURE = 0;
        public final static int INITIAL_NOMINATOR = 4;
        public final static int INITIAL_DENOMINATOR = 4;
        public final static int INITIAL_BAR = 1;
        public final static int INITIAL_REST = REST1_4;
        public final static int INITIAL_BPM = 120;
        public final static String INITIAL_INSTRUMENT = "piano";

        public final static int MIN_FLAGS = 0;
        public final static int MIN_DOTS = 0;
        public final static int MIN_KEY_SIGNATURE = 0;
        public final static int MIN_NOMINATOR = 1;
        public final static int MIN_DENOMINATOR = 1;
        public final static int MIN_BAR = 1;
        public final static int MIN_BPM = 1;

        public final static int MAX_FLAGS = 3;
        public final static int MAX_DOTS = 2;
        public final static int MAX_KEY_SIGNATURE = 7;
        public final static int MAX_NOMINATOR = 32;
        public final static int MAX_DENOMINATOR = 32;
        public final static int MAX_BAR = 2;
        public final static int MAX_BPM = 200;

        public final static int STEP_FLAGS = 1;
        public final static int STEP_DOTS = 1;
        public final static int STEP_KEY_SIGNATURE = 1;
        public final static int STEP_NOMINATOR = 1;
        public final static int STEP_DENOMINATOR = 1;
        public final static int STEP_BAR = 1;
        public final static int STEP_BPM = 1;
}

